package com.wmyg.scanninggun.service.impl;

import com.wmyg.scanninggun.bean.Brand;
import com.wmyg.scanninggun.dao.BrandMapper;
import com.wmyg.scanninggun.service.BrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("brandService")
public class BrandServiceImpl implements BrandService {

    @Autowired
    private BrandMapper brandMapper;

    @Override
    public int delete(int id) {
        return 0;
    }

    @Override
    public int insert(Brand brand) {
        return brandMapper.insert(brand);
    }

    @Override
    public int update(Brand brand) {
        return brandMapper.update(brand);
    }

    @Override
    public Brand selectById(int brandId) {
        return brandMapper.view(brandId);
    }

    @Override
    public List<Brand> findAll() {
        return brandMapper.findAll();
    }
}
